package cn.edu.sjtu.stap.sootbranchinstr;

import cn.edu.sjtu.stap.sootbranchinstr.template.TemplateMaker;
import soot.*;

public class MainDriver {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
        if(args.length == 0){
        	System.err.println("Usage: java MainDriver [options] classname");
        	System.exit(0);
        }
        
        Pack jtp = PackManager.v().getPack("jtp");
        jtp.add(new Transform("jtp.instrumenter", new BranchInstruTransformer()));
        
        System.out.println(args.length);
        soot.Main.main(args);
        
        TemplateMaker.dumpTemplate("if_temp.txt", "sw_temp.txt", "poly_temp.txt");
	}

}
